import 'package:flutter_deer/generated/json/base/json_convert_content.dart';
import 'package:flutter_deer/database/beans/order/order_list_bean_entity.dart';

OrderListBeanEntity $OrderListBeanEntityFromJson(Map<String, dynamic> json) {
  final OrderListBeanEntity orderListBeanEntity = OrderListBeanEntity();
  final List<OrderListBeanList>? list = (json['list'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<OrderListBeanList>(e) as OrderListBeanList).toList();
  if (list != null) {
    orderListBeanEntity.list = list;
  }
  final int? total = jsonConvert.convert<int>(json['total']);
  if (total != null) {
    orderListBeanEntity.total = total;
  }
  return orderListBeanEntity;
}

Map<String, dynamic> $OrderListBeanEntityToJson(OrderListBeanEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['list'] = entity.list?.map((v) => v.toJson()).toList();
  data['total'] = entity.total;
  return data;
}

extension OrderListBeanEntityExtension on OrderListBeanEntity {
  OrderListBeanEntity copyWith({
    List<OrderListBeanList>? list,
    int? total,
  }) {
    return OrderListBeanEntity()
      ..list = list ?? this.list
      ..total = total ?? this.total;
  }
}

OrderListBeanList $OrderListBeanListFromJson(Map<String, dynamic> json) {
  final OrderListBeanList orderListBeanList = OrderListBeanList();
  final String? cashBackAmount = jsonConvert.convert<String>(json['cashBackAmount']);
  if (cashBackAmount != null) {
    orderListBeanList.cashBackAmount = cashBackAmount;
  }
  final String? clientType = jsonConvert.convert<String>(json['clientType']);
  if (clientType != null) {
    orderListBeanList.clientType = clientType;
  }
  final String? clientTypeName = jsonConvert.convert<String>(json['clientTypeName']);
  if (clientTypeName != null) {
    orderListBeanList.clientTypeName = clientTypeName;
  }
  final bool? compositePay = jsonConvert.convert<bool>(json['compositePay']);
  if (compositePay != null) {
    orderListBeanList.compositePay = compositePay;
  }
  final int? consumeIntegral = jsonConvert.convert<int>(json['consumeIntegral']);
  if (consumeIntegral != null) {
    orderListBeanList.consumeIntegral = consumeIntegral;
  }
  final String? consumeType = jsonConvert.convert<String>(json['consumeType']);
  if (consumeType != null) {
    orderListBeanList.consumeType = consumeType;
  }
  final String? coverImageUrl = jsonConvert.convert<String>(json['coverImageUrl']);
  if (coverImageUrl != null) {
    orderListBeanList.coverImageUrl = coverImageUrl;
  }
  final OrderListBeanListDeliveryInfoResponse? deliveryInfoResponse = jsonConvert.convert<OrderListBeanListDeliveryInfoResponse>(json['deliveryInfoResponse']);
  if (deliveryInfoResponse != null) {
    orderListBeanList.deliveryInfoResponse = deliveryInfoResponse;
  }
  final int? deliveryStatus = jsonConvert.convert<int>(json['deliveryStatus']);
  if (deliveryStatus != null) {
    orderListBeanList.deliveryStatus = deliveryStatus;
  }
  final int? deliveryType = jsonConvert.convert<int>(json['deliveryType']);
  if (deliveryType != null) {
    orderListBeanList.deliveryType = deliveryType;
  }
  final int? goodsIntegral = jsonConvert.convert<int>(json['goodsIntegral']);
  if (goodsIntegral != null) {
    orderListBeanList.goodsIntegral = goodsIntegral;
  }
  final String? goodsName = jsonConvert.convert<String>(json['goodsName']);
  if (goodsName != null) {
    orderListBeanList.goodsName = goodsName;
  }
  final String? goodsNames = jsonConvert.convert<String>(json['goodsNames']);
  if (goodsNames != null) {
    orderListBeanList.goodsNames = goodsNames;
  }
  final String? goodsTypes = jsonConvert.convert<String>(json['goodsTypes']);
  if (goodsTypes != null) {
    orderListBeanList.goodsTypes = goodsTypes;
  }
  final String? mchGoodsName = jsonConvert.convert<String>(json['mchGoodsName']);
  if (mchGoodsName != null) {
    orderListBeanList.mchGoodsName = mchGoodsName;
  }
  final String? mchGoodsNum = jsonConvert.convert<String>(json['mchGoodsNum']);
  if (mchGoodsNum != null) {
    orderListBeanList.mchGoodsNum = mchGoodsNum;
  }
  final String? mchName = jsonConvert.convert<String>(json['mchName']);
  if (mchName != null) {
    orderListBeanList.mchName = mchName;
  }
  final int? memberPayAmount = jsonConvert.convert<int>(json['memberPayAmount']);
  if (memberPayAmount != null) {
    orderListBeanList.memberPayAmount = memberPayAmount;
  }
  final String? orderAmount = jsonConvert.convert<String>(json['orderAmount']);
  if (orderAmount != null) {
    orderListBeanList.orderAmount = orderAmount;
  }
  final int? orderCategory = jsonConvert.convert<int>(json['orderCategory']);
  if (orderCategory != null) {
    orderListBeanList.orderCategory = orderCategory;
  }
  final String? orderCode = jsonConvert.convert<String>(json['orderCode']);
  if (orderCode != null) {
    orderListBeanList.orderCode = orderCode;
  }
  final List<OrderListBeanListOrderDiscounts>? orderDiscounts = (json['orderDiscounts'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<OrderListBeanListOrderDiscounts>(e) as OrderListBeanListOrderDiscounts).toList();
  if (orderDiscounts != null) {
    orderListBeanList.orderDiscounts = orderDiscounts;
  }
  final List<OrderListBeanListOrderGoodsDetailResponse>? orderGoodsDetailResponse = (json['orderGoodsDetailResponse'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<OrderListBeanListOrderGoodsDetailResponse>(e) as OrderListBeanListOrderGoodsDetailResponse).toList();
  if (orderGoodsDetailResponse != null) {
    orderListBeanList.orderGoodsDetailResponse = orderGoodsDetailResponse;
  }
  final String? orderId = jsonConvert.convert<String>(json['orderId']);
  if (orderId != null) {
    orderListBeanList.orderId = orderId;
  }
  final int? orderStatus = jsonConvert.convert<int>(json['orderStatus']);
  if (orderStatus != null) {
    orderListBeanList.orderStatus = orderStatus;
  }
  final String? orderTime = jsonConvert.convert<String>(json['orderTime']);
  if (orderTime != null) {
    orderListBeanList.orderTime = orderTime;
  }
  final int? orderType = jsonConvert.convert<int>(json['orderType']);
  if (orderType != null) {
    orderListBeanList.orderType = orderType;
  }
  final int? payAmount = jsonConvert.convert<int>(json['payAmount']);
  if (payAmount != null) {
    orderListBeanList.payAmount = payAmount;
  }
  final List<dynamic>? payTypeNames = (json['payTypeNames'] as List<dynamic>?)?.map(
          (e) => e).toList();
  if (payTypeNames != null) {
    orderListBeanList.payTypeNames = payTypeNames;
  }
  final List<dynamic>? payTypes = (json['payTypes'] as List<dynamic>?)?.map(
          (e) => e).toList();
  if (payTypes != null) {
    orderListBeanList.payTypes = payTypes;
  }
  final int? payableAmount = jsonConvert.convert<int>(json['payableAmount']);
  if (payableAmount != null) {
    orderListBeanList.payableAmount = payableAmount;
  }
  final String? phone = jsonConvert.convert<String>(json['phone']);
  if (phone != null) {
    orderListBeanList.phone = phone;
  }
  final int? quantity = jsonConvert.convert<int>(json['quantity']);
  if (quantity != null) {
    orderListBeanList.quantity = quantity;
  }
  final int? sortTimestamp = jsonConvert.convert<int>(json['sortTimestamp']);
  if (sortTimestamp != null) {
    orderListBeanList.sortTimestamp = sortTimestamp;
  }
  final String? staffName = jsonConvert.convert<String>(json['staffName']);
  if (staffName != null) {
    orderListBeanList.staffName = staffName;
  }
  final String? supplierCode = jsonConvert.convert<String>(json['supplierCode']);
  if (supplierCode != null) {
    orderListBeanList.supplierCode = supplierCode;
  }
  final int? tempOrderAmount = jsonConvert.convert<int>(json['tempOrderAmount']);
  if (tempOrderAmount != null) {
    orderListBeanList.tempOrderAmount = tempOrderAmount;
  }
  final int? virtualGoods = jsonConvert.convert<int>(json['virtualGoods']);
  if (virtualGoods != null) {
    orderListBeanList.virtualGoods = virtualGoods;
  }
  return orderListBeanList;
}

Map<String, dynamic> $OrderListBeanListToJson(OrderListBeanList entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['cashBackAmount'] = entity.cashBackAmount;
  data['clientType'] = entity.clientType;
  data['clientTypeName'] = entity.clientTypeName;
  data['compositePay'] = entity.compositePay;
  data['consumeIntegral'] = entity.consumeIntegral;
  data['consumeType'] = entity.consumeType;
  data['coverImageUrl'] = entity.coverImageUrl;
  data['deliveryInfoResponse'] = entity.deliveryInfoResponse?.toJson();
  data['deliveryStatus'] = entity.deliveryStatus;
  data['deliveryType'] = entity.deliveryType;
  data['goodsIntegral'] = entity.goodsIntegral;
  data['goodsName'] = entity.goodsName;
  data['goodsNames'] = entity.goodsNames;
  data['goodsTypes'] = entity.goodsTypes;
  data['mchGoodsName'] = entity.mchGoodsName;
  data['mchGoodsNum'] = entity.mchGoodsNum;
  data['mchName'] = entity.mchName;
  data['memberPayAmount'] = entity.memberPayAmount;
  data['orderAmount'] = entity.orderAmount;
  data['orderCategory'] = entity.orderCategory;
  data['orderCode'] = entity.orderCode;
  data['orderDiscounts'] = entity.orderDiscounts?.map((v) => v.toJson()).toList();
  data['orderGoodsDetailResponse'] = entity.orderGoodsDetailResponse?.map((v) => v.toJson()).toList();
  data['orderId'] = entity.orderId;
  data['orderStatus'] = entity.orderStatus;
  data['orderTime'] = entity.orderTime;
  data['orderType'] = entity.orderType;
  data['payAmount'] = entity.payAmount;
  data['payTypeNames'] = entity.payTypeNames;
  data['payTypes'] = entity.payTypes;
  data['payableAmount'] = entity.payableAmount;
  data['phone'] = entity.phone;
  data['quantity'] = entity.quantity;
  data['sortTimestamp'] = entity.sortTimestamp;
  data['staffName'] = entity.staffName;
  data['supplierCode'] = entity.supplierCode;
  data['tempOrderAmount'] = entity.tempOrderAmount;
  data['virtualGoods'] = entity.virtualGoods;
  return data;
}

extension OrderListBeanListExtension on OrderListBeanList {
  OrderListBeanList copyWith({
    String? cashBackAmount,
    String? clientType,
    String? clientTypeName,
    bool? compositePay,
    int? consumeIntegral,
    String? consumeType,
    String? coverImageUrl,
    OrderListBeanListDeliveryInfoResponse? deliveryInfoResponse,
    int? deliveryStatus,
    int? deliveryType,
    int? goodsIntegral,
    String? goodsName,
    String? goodsNames,
    String? goodsTypes,
    String? mchGoodsName,
    String? mchGoodsNum,
    String? mchName,
    int? memberPayAmount,
    String? orderAmount,
    int? orderCategory,
    String? orderCode,
    List<OrderListBeanListOrderDiscounts>? orderDiscounts,
    List<OrderListBeanListOrderGoodsDetailResponse>? orderGoodsDetailResponse,
    String? orderId,
    int? orderStatus,
    String? orderTime,
    int? orderType,
    int? payAmount,
    List<dynamic>? payTypeNames,
    List<dynamic>? payTypes,
    int? payableAmount,
    String? phone,
    int? quantity,
    int? sortTimestamp,
    String? staffName,
    String? supplierCode,
    int? tempOrderAmount,
    int? virtualGoods,
  }) {
    return OrderListBeanList()
      ..cashBackAmount = cashBackAmount ?? this.cashBackAmount
      ..clientType = clientType ?? this.clientType
      ..clientTypeName = clientTypeName ?? this.clientTypeName
      ..compositePay = compositePay ?? this.compositePay
      ..consumeIntegral = consumeIntegral ?? this.consumeIntegral
      ..consumeType = consumeType ?? this.consumeType
      ..coverImageUrl = coverImageUrl ?? this.coverImageUrl
      ..deliveryInfoResponse = deliveryInfoResponse ?? this.deliveryInfoResponse
      ..deliveryStatus = deliveryStatus ?? this.deliveryStatus
      ..deliveryType = deliveryType ?? this.deliveryType
      ..goodsIntegral = goodsIntegral ?? this.goodsIntegral
      ..goodsName = goodsName ?? this.goodsName
      ..goodsNames = goodsNames ?? this.goodsNames
      ..goodsTypes = goodsTypes ?? this.goodsTypes
      ..mchGoodsName = mchGoodsName ?? this.mchGoodsName
      ..mchGoodsNum = mchGoodsNum ?? this.mchGoodsNum
      ..mchName = mchName ?? this.mchName
      ..memberPayAmount = memberPayAmount ?? this.memberPayAmount
      ..orderAmount = orderAmount ?? this.orderAmount
      ..orderCategory = orderCategory ?? this.orderCategory
      ..orderCode = orderCode ?? this.orderCode
      ..orderDiscounts = orderDiscounts ?? this.orderDiscounts
      ..orderGoodsDetailResponse = orderGoodsDetailResponse ?? this.orderGoodsDetailResponse
      ..orderId = orderId ?? this.orderId
      ..orderStatus = orderStatus ?? this.orderStatus
      ..orderTime = orderTime ?? this.orderTime
      ..orderType = orderType ?? this.orderType
      ..payAmount = payAmount ?? this.payAmount
      ..payTypeNames = payTypeNames ?? this.payTypeNames
      ..payTypes = payTypes ?? this.payTypes
      ..payableAmount = payableAmount ?? this.payableAmount
      ..phone = phone ?? this.phone
      ..quantity = quantity ?? this.quantity
      ..sortTimestamp = sortTimestamp ?? this.sortTimestamp
      ..staffName = staffName ?? this.staffName
      ..supplierCode = supplierCode ?? this.supplierCode
      ..tempOrderAmount = tempOrderAmount ?? this.tempOrderAmount
      ..virtualGoods = virtualGoods ?? this.virtualGoods;
  }
}

OrderListBeanListDeliveryInfoResponse $OrderListBeanListDeliveryInfoResponseFromJson(Map<String, dynamic> json) {
  final OrderListBeanListDeliveryInfoResponse orderListBeanListDeliveryInfoResponse = OrderListBeanListDeliveryInfoResponse();
  final String? address = jsonConvert.convert<String>(json['address']);
  if (address != null) {
    orderListBeanListDeliveryInfoResponse.address = address;
  }
  final String? consigneeName = jsonConvert.convert<String>(json['consigneeName']);
  if (consigneeName != null) {
    orderListBeanListDeliveryInfoResponse.consigneeName = consigneeName;
  }
  final String? consigneePhone = jsonConvert.convert<String>(json['consigneePhone']);
  if (consigneePhone != null) {
    orderListBeanListDeliveryInfoResponse.consigneePhone = consigneePhone;
  }
  final String? createName = jsonConvert.convert<String>(json['createName']);
  if (createName != null) {
    orderListBeanListDeliveryInfoResponse.createName = createName;
  }
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    orderListBeanListDeliveryInfoResponse.createTime = createTime;
  }
  final String? deliveryCode = jsonConvert.convert<String>(json['deliveryCode']);
  if (deliveryCode != null) {
    orderListBeanListDeliveryInfoResponse.deliveryCode = deliveryCode;
  }
  final int? deliveryStatus = jsonConvert.convert<int>(json['deliveryStatus']);
  if (deliveryStatus != null) {
    orderListBeanListDeliveryInfoResponse.deliveryStatus = deliveryStatus;
  }
  final int? deliveryType = jsonConvert.convert<int>(json['deliveryType']);
  if (deliveryType != null) {
    orderListBeanListDeliveryInfoResponse.deliveryType = deliveryType;
  }
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    orderListBeanListDeliveryInfoResponse.id = id;
  }
  final int? isDeleted = jsonConvert.convert<int>(json['isDeleted']);
  if (isDeleted != null) {
    orderListBeanListDeliveryInfoResponse.isDeleted = isDeleted;
  }
  final String? mchCode = jsonConvert.convert<String>(json['mchCode']);
  if (mchCode != null) {
    orderListBeanListDeliveryInfoResponse.mchCode = mchCode;
  }
  final String? orderCode = jsonConvert.convert<String>(json['orderCode']);
  if (orderCode != null) {
    orderListBeanListDeliveryInfoResponse.orderCode = orderCode;
  }
  final int? orderGoodsId = jsonConvert.convert<int>(json['orderGoodsId']);
  if (orderGoodsId != null) {
    orderListBeanListDeliveryInfoResponse.orderGoodsId = orderGoodsId;
  }
  final int? orderId = jsonConvert.convert<int>(json['orderId']);
  if (orderId != null) {
    orderListBeanListDeliveryInfoResponse.orderId = orderId;
  }
  final String? updateName = jsonConvert.convert<String>(json['updateName']);
  if (updateName != null) {
    orderListBeanListDeliveryInfoResponse.updateName = updateName;
  }
  final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
  if (updateTime != null) {
    orderListBeanListDeliveryInfoResponse.updateTime = updateTime;
  }
  return orderListBeanListDeliveryInfoResponse;
}

Map<String, dynamic> $OrderListBeanListDeliveryInfoResponseToJson(OrderListBeanListDeliveryInfoResponse entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['address'] = entity.address;
  data['consigneeName'] = entity.consigneeName;
  data['consigneePhone'] = entity.consigneePhone;
  data['createName'] = entity.createName;
  data['createTime'] = entity.createTime;
  data['deliveryCode'] = entity.deliveryCode;
  data['deliveryStatus'] = entity.deliveryStatus;
  data['deliveryType'] = entity.deliveryType;
  data['id'] = entity.id;
  data['isDeleted'] = entity.isDeleted;
  data['mchCode'] = entity.mchCode;
  data['orderCode'] = entity.orderCode;
  data['orderGoodsId'] = entity.orderGoodsId;
  data['orderId'] = entity.orderId;
  data['updateName'] = entity.updateName;
  data['updateTime'] = entity.updateTime;
  return data;
}

extension OrderListBeanListDeliveryInfoResponseExtension on OrderListBeanListDeliveryInfoResponse {
  OrderListBeanListDeliveryInfoResponse copyWith({
    String? address,
    String? consigneeName,
    String? consigneePhone,
    String? createName,
    String? createTime,
    String? deliveryCode,
    int? deliveryStatus,
    int? deliveryType,
    int? id,
    int? isDeleted,
    String? mchCode,
    String? orderCode,
    int? orderGoodsId,
    int? orderId,
    String? updateName,
    String? updateTime,
  }) {
    return OrderListBeanListDeliveryInfoResponse()
      ..address = address ?? this.address
      ..consigneeName = consigneeName ?? this.consigneeName
      ..consigneePhone = consigneePhone ?? this.consigneePhone
      ..createName = createName ?? this.createName
      ..createTime = createTime ?? this.createTime
      ..deliveryCode = deliveryCode ?? this.deliveryCode
      ..deliveryStatus = deliveryStatus ?? this.deliveryStatus
      ..deliveryType = deliveryType ?? this.deliveryType
      ..id = id ?? this.id
      ..isDeleted = isDeleted ?? this.isDeleted
      ..mchCode = mchCode ?? this.mchCode
      ..orderCode = orderCode ?? this.orderCode
      ..orderGoodsId = orderGoodsId ?? this.orderGoodsId
      ..orderId = orderId ?? this.orderId
      ..updateName = updateName ?? this.updateName
      ..updateTime = updateTime ?? this.updateTime;
  }
}

OrderListBeanListOrderDiscounts $OrderListBeanListOrderDiscountsFromJson(Map<String, dynamic> json) {
  final OrderListBeanListOrderDiscounts orderListBeanListOrderDiscounts = OrderListBeanListOrderDiscounts();
  final int? discountAmount = jsonConvert.convert<int>(json['discountAmount']);
  if (discountAmount != null) {
    orderListBeanListOrderDiscounts.discountAmount = discountAmount;
  }
  final String? failReason = jsonConvert.convert<String>(json['failReason']);
  if (failReason != null) {
    orderListBeanListOrderDiscounts.failReason = failReason;
  }
  final int? finishTime = jsonConvert.convert<int>(json['finishTime']);
  if (finishTime != null) {
    orderListBeanListOrderDiscounts.finishTime = finishTime;
  }
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    orderListBeanListOrderDiscounts.id = id;
  }
  final int? orderId = jsonConvert.convert<int>(json['orderId']);
  if (orderId != null) {
    orderListBeanListOrderDiscounts.orderId = orderId;
  }
  final String? outTradeNo = jsonConvert.convert<String>(json['outTradeNo']);
  if (outTradeNo != null) {
    orderListBeanListOrderDiscounts.outTradeNo = outTradeNo;
  }
  final int? payAmount = jsonConvert.convert<int>(json['payAmount']);
  if (payAmount != null) {
    orderListBeanListOrderDiscounts.payAmount = payAmount;
  }
  final String? payChannel = jsonConvert.convert<String>(json['payChannel']);
  if (payChannel != null) {
    orderListBeanListOrderDiscounts.payChannel = payChannel;
  }
  final String? payChannelName = jsonConvert.convert<String>(json['payChannelName']);
  if (payChannelName != null) {
    orderListBeanListOrderDiscounts.payChannelName = payChannelName;
  }
  final String? payMethod = jsonConvert.convert<String>(json['payMethod']);
  if (payMethod != null) {
    orderListBeanListOrderDiscounts.payMethod = payMethod;
  }
  final int? payStatus = jsonConvert.convert<int>(json['payStatus']);
  if (payStatus != null) {
    orderListBeanListOrderDiscounts.payStatus = payStatus;
  }
  final int? payTime = jsonConvert.convert<int>(json['payTime']);
  if (payTime != null) {
    orderListBeanListOrderDiscounts.payTime = payTime;
  }
  final String? payType = jsonConvert.convert<String>(json['payType']);
  if (payType != null) {
    orderListBeanListOrderDiscounts.payType = payType;
  }
  final String? payTypeName = jsonConvert.convert<String>(json['payTypeName']);
  if (payTypeName != null) {
    orderListBeanListOrderDiscounts.payTypeName = payTypeName;
  }
  final int? payableAmount = jsonConvert.convert<int>(json['payableAmount']);
  if (payableAmount != null) {
    orderListBeanListOrderDiscounts.payableAmount = payableAmount;
  }
  final String? tradeNo = jsonConvert.convert<String>(json['tradeNo']);
  if (tradeNo != null) {
    orderListBeanListOrderDiscounts.tradeNo = tradeNo;
  }
  return orderListBeanListOrderDiscounts;
}

Map<String, dynamic> $OrderListBeanListOrderDiscountsToJson(OrderListBeanListOrderDiscounts entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['discountAmount'] = entity.discountAmount;
  data['failReason'] = entity.failReason;
  data['finishTime'] = entity.finishTime;
  data['id'] = entity.id;
  data['orderId'] = entity.orderId;
  data['outTradeNo'] = entity.outTradeNo;
  data['payAmount'] = entity.payAmount;
  data['payChannel'] = entity.payChannel;
  data['payChannelName'] = entity.payChannelName;
  data['payMethod'] = entity.payMethod;
  data['payStatus'] = entity.payStatus;
  data['payTime'] = entity.payTime;
  data['payType'] = entity.payType;
  data['payTypeName'] = entity.payTypeName;
  data['payableAmount'] = entity.payableAmount;
  data['tradeNo'] = entity.tradeNo;
  return data;
}

extension OrderListBeanListOrderDiscountsExtension on OrderListBeanListOrderDiscounts {
  OrderListBeanListOrderDiscounts copyWith({
    int? discountAmount,
    String? failReason,
    int? finishTime,
    int? id,
    int? orderId,
    String? outTradeNo,
    int? payAmount,
    String? payChannel,
    String? payChannelName,
    String? payMethod,
    int? payStatus,
    int? payTime,
    String? payType,
    String? payTypeName,
    int? payableAmount,
    String? tradeNo,
  }) {
    return OrderListBeanListOrderDiscounts()
      ..discountAmount = discountAmount ?? this.discountAmount
      ..failReason = failReason ?? this.failReason
      ..finishTime = finishTime ?? this.finishTime
      ..id = id ?? this.id
      ..orderId = orderId ?? this.orderId
      ..outTradeNo = outTradeNo ?? this.outTradeNo
      ..payAmount = payAmount ?? this.payAmount
      ..payChannel = payChannel ?? this.payChannel
      ..payChannelName = payChannelName ?? this.payChannelName
      ..payMethod = payMethod ?? this.payMethod
      ..payStatus = payStatus ?? this.payStatus
      ..payTime = payTime ?? this.payTime
      ..payType = payType ?? this.payType
      ..payTypeName = payTypeName ?? this.payTypeName
      ..payableAmount = payableAmount ?? this.payableAmount
      ..tradeNo = tradeNo ?? this.tradeNo;
  }
}

OrderListBeanListOrderGoodsDetailResponse $OrderListBeanListOrderGoodsDetailResponseFromJson(Map<String, dynamic> json) {
  final OrderListBeanListOrderGoodsDetailResponse orderListBeanListOrderGoodsDetailResponse = OrderListBeanListOrderGoodsDetailResponse();
  final int? actualAmount = jsonConvert.convert<int>(json['actualAmount']);
  if (actualAmount != null) {
    orderListBeanListOrderGoodsDetailResponse.actualAmount = actualAmount;
  }
  final int? consumeIntegral = jsonConvert.convert<int>(json['consumeIntegral']);
  if (consumeIntegral != null) {
    orderListBeanListOrderGoodsDetailResponse.consumeIntegral = consumeIntegral;
  }
  final String? coverImageUrl = jsonConvert.convert<String>(json['coverImageUrl']);
  if (coverImageUrl != null) {
    orderListBeanListOrderGoodsDetailResponse.coverImageUrl = coverImageUrl;
  }
  final String? deliveryCode = jsonConvert.convert<String>(json['deliveryCode']);
  if (deliveryCode != null) {
    orderListBeanListOrderGoodsDetailResponse.deliveryCode = deliveryCode;
  }
  final int? deliveryStatus = jsonConvert.convert<int>(json['deliveryStatus']);
  if (deliveryStatus != null) {
    orderListBeanListOrderGoodsDetailResponse.deliveryStatus = deliveryStatus;
  }
  final int? deliveryType = jsonConvert.convert<int>(json['deliveryType']);
  if (deliveryType != null) {
    orderListBeanListOrderGoodsDetailResponse.deliveryType = deliveryType;
  }
  final int? discountAmount = jsonConvert.convert<int>(json['discountAmount']);
  if (discountAmount != null) {
    orderListBeanListOrderGoodsDetailResponse.discountAmount = discountAmount;
  }
  final int? discountIntegral = jsonConvert.convert<int>(json['discountIntegral']);
  if (discountIntegral != null) {
    orderListBeanListOrderGoodsDetailResponse.discountIntegral = discountIntegral;
  }
  final List<dynamic>? energyOrderCodeList = (json['energyOrderCodeList'] as List<dynamic>?)?.map(
          (e) => e).toList();
  if (energyOrderCodeList != null) {
    orderListBeanListOrderGoodsDetailResponse.energyOrderCodeList = energyOrderCodeList;
  }
  final int? giveIntegral = jsonConvert.convert<int>(json['giveIntegral']);
  if (giveIntegral != null) {
    orderListBeanListOrderGoodsDetailResponse.giveIntegral = giveIntegral;
  }
  final int? goodsAmount = jsonConvert.convert<int>(json['goodsAmount']);
  if (goodsAmount != null) {
    orderListBeanListOrderGoodsDetailResponse.goodsAmount = goodsAmount;
  }
  final int? goodsCategoryId = jsonConvert.convert<int>(json['goodsCategoryId']);
  if (goodsCategoryId != null) {
    orderListBeanListOrderGoodsDetailResponse.goodsCategoryId = goodsCategoryId;
  }
  final List<OrderListBeanListOrderGoodsDetailResponseGoodsDiscountList>? goodsDiscountList = (json['goodsDiscountList'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<OrderListBeanListOrderGoodsDetailResponseGoodsDiscountList>(e) as OrderListBeanListOrderGoodsDetailResponseGoodsDiscountList).toList();
  if (goodsDiscountList != null) {
    orderListBeanListOrderGoodsDetailResponse.goodsDiscountList = goodsDiscountList;
  }
  final int? goodsIntegral = jsonConvert.convert<int>(json['goodsIntegral']);
  if (goodsIntegral != null) {
    orderListBeanListOrderGoodsDetailResponse.goodsIntegral = goodsIntegral;
  }
  final int? goodsType = jsonConvert.convert<int>(json['goodsType']);
  if (goodsType != null) {
    orderListBeanListOrderGoodsDetailResponse.goodsType = goodsType;
  }
  final int? integral = jsonConvert.convert<int>(json['integral']);
  if (integral != null) {
    orderListBeanListOrderGoodsDetailResponse.integral = integral;
  }
  final int? isSettlement = jsonConvert.convert<int>(json['isSettlement']);
  if (isSettlement != null) {
    orderListBeanListOrderGoodsDetailResponse.isSettlement = isSettlement;
  }
  final int? mchGoodsId = jsonConvert.convert<int>(json['mchGoodsId']);
  if (mchGoodsId != null) {
    orderListBeanListOrderGoodsDetailResponse.mchGoodsId = mchGoodsId;
  }
  final String? mchGoodsName = jsonConvert.convert<String>(json['mchGoodsName']);
  if (mchGoodsName != null) {
    orderListBeanListOrderGoodsDetailResponse.mchGoodsName = mchGoodsName;
  }
  final String? orderCode = jsonConvert.convert<String>(json['orderCode']);
  if (orderCode != null) {
    orderListBeanListOrderGoodsDetailResponse.orderCode = orderCode;
  }
  final List<OrderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons>? orderGoodsCoupons = (json['orderGoodsCoupons'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<OrderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons>(e) as OrderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons).toList();
  if (orderGoodsCoupons != null) {
    orderListBeanListOrderGoodsDetailResponse.orderGoodsCoupons = orderGoodsCoupons;
  }
  final int? orderGoodsId = jsonConvert.convert<int>(json['orderGoodsId']);
  if (orderGoodsId != null) {
    orderListBeanListOrderGoodsDetailResponse.orderGoodsId = orderGoodsId;
  }
  final int? orderId = jsonConvert.convert<int>(json['orderId']);
  if (orderId != null) {
    orderListBeanListOrderGoodsDetailResponse.orderId = orderId;
  }
  final OrderListBeanListOrderGoodsDetailResponseOrderLogistics? orderLogistics = jsonConvert.convert<OrderListBeanListOrderGoodsDetailResponseOrderLogistics>(
      json['orderLogistics']);
  if (orderLogistics != null) {
    orderListBeanListOrderGoodsDetailResponse.orderLogistics = orderLogistics;
  }
  final int? orderStatus = jsonConvert.convert<int>(json['orderStatus']);
  if (orderStatus != null) {
    orderListBeanListOrderGoodsDetailResponse.orderStatus = orderStatus;
  }
  final int? payAmount = jsonConvert.convert<int>(json['payAmount']);
  if (payAmount != null) {
    orderListBeanListOrderGoodsDetailResponse.payAmount = payAmount;
  }
  final int? price = jsonConvert.convert<int>(json['price']);
  if (price != null) {
    orderListBeanListOrderGoodsDetailResponse.price = price;
  }
  final int? quantity = jsonConvert.convert<int>(json['quantity']);
  if (quantity != null) {
    orderListBeanListOrderGoodsDetailResponse.quantity = quantity;
  }
  final int? refundStatus = jsonConvert.convert<int>(json['refundStatus']);
  if (refundStatus != null) {
    orderListBeanListOrderGoodsDetailResponse.refundStatus = refundStatus;
  }
  final int? salesChannelGoodsId = jsonConvert.convert<int>(json['salesChannelGoodsId']);
  if (salesChannelGoodsId != null) {
    orderListBeanListOrderGoodsDetailResponse.salesChannelGoodsId = salesChannelGoodsId;
  }
  final int? shelfId = jsonConvert.convert<int>(json['shelfId']);
  if (shelfId != null) {
    orderListBeanListOrderGoodsDetailResponse.shelfId = shelfId;
  }
  final int? shelfNo = jsonConvert.convert<int>(json['shelfNo']);
  if (shelfNo != null) {
    orderListBeanListOrderGoodsDetailResponse.shelfNo = shelfNo;
  }
  final String? shelfNoStr = jsonConvert.convert<String>(json['shelfNoStr']);
  if (shelfNoStr != null) {
    orderListBeanListOrderGoodsDetailResponse.shelfNoStr = shelfNoStr;
  }
  final String? supplierCode = jsonConvert.convert<String>(json['supplierCode']);
  if (supplierCode != null) {
    orderListBeanListOrderGoodsDetailResponse.supplierCode = supplierCode;
  }
  final String? supplierName = jsonConvert.convert<String>(json['supplierName']);
  if (supplierName != null) {
    orderListBeanListOrderGoodsDetailResponse.supplierName = supplierName;
  }
  final String? unit = jsonConvert.convert<String>(json['unit']);
  if (unit != null) {
    orderListBeanListOrderGoodsDetailResponse.unit = unit;
  }
  return orderListBeanListOrderGoodsDetailResponse;
}

Map<String, dynamic> $OrderListBeanListOrderGoodsDetailResponseToJson(OrderListBeanListOrderGoodsDetailResponse entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['actualAmount'] = entity.actualAmount;
  data['consumeIntegral'] = entity.consumeIntegral;
  data['coverImageUrl'] = entity.coverImageUrl;
  data['deliveryCode'] = entity.deliveryCode;
  data['deliveryStatus'] = entity.deliveryStatus;
  data['deliveryType'] = entity.deliveryType;
  data['discountAmount'] = entity.discountAmount;
  data['discountIntegral'] = entity.discountIntegral;
  data['energyOrderCodeList'] = entity.energyOrderCodeList;
  data['giveIntegral'] = entity.giveIntegral;
  data['goodsAmount'] = entity.goodsAmount;
  data['goodsCategoryId'] = entity.goodsCategoryId;
  data['goodsDiscountList'] = entity.goodsDiscountList?.map((v) => v.toJson()).toList();
  data['goodsIntegral'] = entity.goodsIntegral;
  data['goodsType'] = entity.goodsType;
  data['integral'] = entity.integral;
  data['isSettlement'] = entity.isSettlement;
  data['mchGoodsId'] = entity.mchGoodsId;
  data['mchGoodsName'] = entity.mchGoodsName;
  data['orderCode'] = entity.orderCode;
  data['orderGoodsCoupons'] = entity.orderGoodsCoupons?.map((v) => v.toJson()).toList();
  data['orderGoodsId'] = entity.orderGoodsId;
  data['orderId'] = entity.orderId;
  data['orderLogistics'] = entity.orderLogistics?.toJson();
  data['orderStatus'] = entity.orderStatus;
  data['payAmount'] = entity.payAmount;
  data['price'] = entity.price;
  data['quantity'] = entity.quantity;
  data['refundStatus'] = entity.refundStatus;
  data['salesChannelGoodsId'] = entity.salesChannelGoodsId;
  data['shelfId'] = entity.shelfId;
  data['shelfNo'] = entity.shelfNo;
  data['shelfNoStr'] = entity.shelfNoStr;
  data['supplierCode'] = entity.supplierCode;
  data['supplierName'] = entity.supplierName;
  data['unit'] = entity.unit;
  return data;
}

extension OrderListBeanListOrderGoodsDetailResponseExtension on OrderListBeanListOrderGoodsDetailResponse {
  OrderListBeanListOrderGoodsDetailResponse copyWith({
    int? actualAmount,
    int? consumeIntegral,
    String? coverImageUrl,
    String? deliveryCode,
    int? deliveryStatus,
    int? deliveryType,
    int? discountAmount,
    int? discountIntegral,
    List<dynamic>? energyOrderCodeList,
    int? giveIntegral,
    int? goodsAmount,
    int? goodsCategoryId,
    List<OrderListBeanListOrderGoodsDetailResponseGoodsDiscountList>? goodsDiscountList,
    int? goodsIntegral,
    int? goodsType,
    int? integral,
    int? isSettlement,
    int? mchGoodsId,
    String? mchGoodsName,
    String? orderCode,
    List<OrderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons>? orderGoodsCoupons,
    int? orderGoodsId,
    int? orderId,
    OrderListBeanListOrderGoodsDetailResponseOrderLogistics? orderLogistics,
    int? orderStatus,
    int? payAmount,
    int? price,
    int? quantity,
    int? refundStatus,
    int? salesChannelGoodsId,
    int? shelfId,
    int? shelfNo,
    String? shelfNoStr,
    String? supplierCode,
    String? supplierName,
    String? unit,
  }) {
    return OrderListBeanListOrderGoodsDetailResponse()
      ..actualAmount = actualAmount ?? this.actualAmount
      ..consumeIntegral = consumeIntegral ?? this.consumeIntegral
      ..coverImageUrl = coverImageUrl ?? this.coverImageUrl
      ..deliveryCode = deliveryCode ?? this.deliveryCode
      ..deliveryStatus = deliveryStatus ?? this.deliveryStatus
      ..deliveryType = deliveryType ?? this.deliveryType
      ..discountAmount = discountAmount ?? this.discountAmount
      ..discountIntegral = discountIntegral ?? this.discountIntegral
      ..energyOrderCodeList = energyOrderCodeList ?? this.energyOrderCodeList
      ..giveIntegral = giveIntegral ?? this.giveIntegral
      ..goodsAmount = goodsAmount ?? this.goodsAmount
      ..goodsCategoryId = goodsCategoryId ?? this.goodsCategoryId
      ..goodsDiscountList = goodsDiscountList ?? this.goodsDiscountList
      ..goodsIntegral = goodsIntegral ?? this.goodsIntegral
      ..goodsType = goodsType ?? this.goodsType
      ..integral = integral ?? this.integral
      ..isSettlement = isSettlement ?? this.isSettlement
      ..mchGoodsId = mchGoodsId ?? this.mchGoodsId
      ..mchGoodsName = mchGoodsName ?? this.mchGoodsName
      ..orderCode = orderCode ?? this.orderCode
      ..orderGoodsCoupons = orderGoodsCoupons ?? this.orderGoodsCoupons
      ..orderGoodsId = orderGoodsId ?? this.orderGoodsId
      ..orderId = orderId ?? this.orderId
      ..orderLogistics = orderLogistics ?? this.orderLogistics
      ..orderStatus = orderStatus ?? this.orderStatus
      ..payAmount = payAmount ?? this.payAmount
      ..price = price ?? this.price
      ..quantity = quantity ?? this.quantity
      ..refundStatus = refundStatus ?? this.refundStatus
      ..salesChannelGoodsId = salesChannelGoodsId ?? this.salesChannelGoodsId
      ..shelfId = shelfId ?? this.shelfId
      ..shelfNo = shelfNo ?? this.shelfNo
      ..shelfNoStr = shelfNoStr ?? this.shelfNoStr
      ..supplierCode = supplierCode ?? this.supplierCode
      ..supplierName = supplierName ?? this.supplierName
      ..unit = unit ?? this.unit;
  }
}

OrderListBeanListOrderGoodsDetailResponseGoodsDiscountList $OrderListBeanListOrderGoodsDetailResponseGoodsDiscountListFromJson(Map<String, dynamic> json) {
  final OrderListBeanListOrderGoodsDetailResponseGoodsDiscountList orderListBeanListOrderGoodsDetailResponseGoodsDiscountList = OrderListBeanListOrderGoodsDetailResponseGoodsDiscountList();
  final String? bizCode = jsonConvert.convert<String>(json['bizCode']);
  if (bizCode != null) {
    orderListBeanListOrderGoodsDetailResponseGoodsDiscountList.bizCode = bizCode;
  }
  final int? bizId = jsonConvert.convert<int>(json['bizId']);
  if (bizId != null) {
    orderListBeanListOrderGoodsDetailResponseGoodsDiscountList.bizId = bizId;
  }
  final int? discountAmount = jsonConvert.convert<int>(json['discountAmount']);
  if (discountAmount != null) {
    orderListBeanListOrderGoodsDetailResponseGoodsDiscountList.discountAmount = discountAmount;
  }
  final String? discountDesc = jsonConvert.convert<String>(json['discountDesc']);
  if (discountDesc != null) {
    orderListBeanListOrderGoodsDetailResponseGoodsDiscountList.discountDesc = discountDesc;
  }
  final int? discountIntegral = jsonConvert.convert<int>(json['discountIntegral']);
  if (discountIntegral != null) {
    orderListBeanListOrderGoodsDetailResponseGoodsDiscountList.discountIntegral = discountIntegral;
  }
  final String? discountType = jsonConvert.convert<String>(json['discountType']);
  if (discountType != null) {
    orderListBeanListOrderGoodsDetailResponseGoodsDiscountList.discountType = discountType;
  }
  final int? goodsQuantity = jsonConvert.convert<int>(json['goodsQuantity']);
  if (goodsQuantity != null) {
    orderListBeanListOrderGoodsDetailResponseGoodsDiscountList.goodsQuantity = goodsQuantity;
  }
  final int? mchGoodsId = jsonConvert.convert<int>(json['mchGoodsId']);
  if (mchGoodsId != null) {
    orderListBeanListOrderGoodsDetailResponseGoodsDiscountList.mchGoodsId = mchGoodsId;
  }
  final int? orderFinanceId = jsonConvert.convert<int>(json['orderFinanceId']);
  if (orderFinanceId != null) {
    orderListBeanListOrderGoodsDetailResponseGoodsDiscountList.orderFinanceId = orderFinanceId;
  }
  final int? orderId = jsonConvert.convert<int>(json['orderId']);
  if (orderId != null) {
    orderListBeanListOrderGoodsDetailResponseGoodsDiscountList.orderId = orderId;
  }
  final String? payChannel = jsonConvert.convert<String>(json['payChannel']);
  if (payChannel != null) {
    orderListBeanListOrderGoodsDetailResponseGoodsDiscountList.payChannel = payChannel;
  }
  final String? payChannelName = jsonConvert.convert<String>(json['payChannelName']);
  if (payChannelName != null) {
    orderListBeanListOrderGoodsDetailResponseGoodsDiscountList.payChannelName = payChannelName;
  }
  final int? useIntegral = jsonConvert.convert<int>(json['useIntegral']);
  if (useIntegral != null) {
    orderListBeanListOrderGoodsDetailResponseGoodsDiscountList.useIntegral = useIntegral;
  }
  return orderListBeanListOrderGoodsDetailResponseGoodsDiscountList;
}

Map<String, dynamic> $OrderListBeanListOrderGoodsDetailResponseGoodsDiscountListToJson(OrderListBeanListOrderGoodsDetailResponseGoodsDiscountList entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['bizCode'] = entity.bizCode;
  data['bizId'] = entity.bizId;
  data['discountAmount'] = entity.discountAmount;
  data['discountDesc'] = entity.discountDesc;
  data['discountIntegral'] = entity.discountIntegral;
  data['discountType'] = entity.discountType;
  data['goodsQuantity'] = entity.goodsQuantity;
  data['mchGoodsId'] = entity.mchGoodsId;
  data['orderFinanceId'] = entity.orderFinanceId;
  data['orderId'] = entity.orderId;
  data['payChannel'] = entity.payChannel;
  data['payChannelName'] = entity.payChannelName;
  data['useIntegral'] = entity.useIntegral;
  return data;
}

extension OrderListBeanListOrderGoodsDetailResponseGoodsDiscountListExtension on OrderListBeanListOrderGoodsDetailResponseGoodsDiscountList {
  OrderListBeanListOrderGoodsDetailResponseGoodsDiscountList copyWith({
    String? bizCode,
    int? bizId,
    int? discountAmount,
    String? discountDesc,
    int? discountIntegral,
    String? discountType,
    int? goodsQuantity,
    int? mchGoodsId,
    int? orderFinanceId,
    int? orderId,
    String? payChannel,
    String? payChannelName,
    int? useIntegral,
  }) {
    return OrderListBeanListOrderGoodsDetailResponseGoodsDiscountList()
      ..bizCode = bizCode ?? this.bizCode
      ..bizId = bizId ?? this.bizId
      ..discountAmount = discountAmount ?? this.discountAmount
      ..discountDesc = discountDesc ?? this.discountDesc
      ..discountIntegral = discountIntegral ?? this.discountIntegral
      ..discountType = discountType ?? this.discountType
      ..goodsQuantity = goodsQuantity ?? this.goodsQuantity
      ..mchGoodsId = mchGoodsId ?? this.mchGoodsId
      ..orderFinanceId = orderFinanceId ?? this.orderFinanceId
      ..orderId = orderId ?? this.orderId
      ..payChannel = payChannel ?? this.payChannel
      ..payChannelName = payChannelName ?? this.payChannelName
      ..useIntegral = useIntegral ?? this.useIntegral;
  }
}

OrderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons $OrderListBeanListOrderGoodsDetailResponseOrderGoodsCouponsFromJson(Map<String, dynamic> json) {
  final OrderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons = OrderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons();
  final String? couponRuleDesc = jsonConvert.convert<String>(json['couponRuleDesc']);
  if (couponRuleDesc != null) {
    orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons.couponRuleDesc = couponRuleDesc;
  }
  final String? createName = jsonConvert.convert<String>(json['createName']);
  if (createName != null) {
    orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons.createName = createName;
  }
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons.createTime = createTime;
  }
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons.id = id;
  }
  final bool? isDeleted = jsonConvert.convert<bool>(json['isDeleted']);
  if (isDeleted != null) {
    orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons.isDeleted = isDeleted;
  }
  final int? masterOrderId = jsonConvert.convert<int>(json['masterOrderId']);
  if (masterOrderId != null) {
    orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons.masterOrderId = masterOrderId;
  }
  final String? mchCouponAmount = jsonConvert.convert<String>(json['mchCouponAmount']);
  if (mchCouponAmount != null) {
    orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons.mchCouponAmount = mchCouponAmount;
  }
  final int? mchCouponId = jsonConvert.convert<int>(json['mchCouponId']);
  if (mchCouponId != null) {
    orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons.mchCouponId = mchCouponId;
  }
  final String? mchCouponName = jsonConvert.convert<String>(json['mchCouponName']);
  if (mchCouponName != null) {
    orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons.mchCouponName = mchCouponName;
  }
  final int? mchGoodsId = jsonConvert.convert<int>(json['mchGoodsId']);
  if (mchGoodsId != null) {
    orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons.mchGoodsId = mchGoodsId;
  }
  final String? mchGoodsName = jsonConvert.convert<String>(json['mchGoodsName']);
  if (mchGoodsName != null) {
    orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons.mchGoodsName = mchGoodsName;
  }
  final int? orderGoodsId = jsonConvert.convert<int>(json['orderGoodsId']);
  if (orderGoodsId != null) {
    orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons.orderGoodsId = orderGoodsId;
  }
  final int? orderId = jsonConvert.convert<int>(json['orderId']);
  if (orderId != null) {
    orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons.orderId = orderId;
  }
  final int? quantity = jsonConvert.convert<int>(json['quantity']);
  if (quantity != null) {
    orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons.quantity = quantity;
  }
  final String? remark = jsonConvert.convert<String>(json['remark']);
  if (remark != null) {
    orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons.remark = remark;
  }
  final int? salesChannelGoodsId = jsonConvert.convert<int>(json['salesChannelGoodsId']);
  if (salesChannelGoodsId != null) {
    orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons.salesChannelGoodsId = salesChannelGoodsId;
  }
  final String? updateName = jsonConvert.convert<String>(json['updateName']);
  if (updateName != null) {
    orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons.updateName = updateName;
  }
  final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
  if (updateTime != null) {
    orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons.updateTime = updateTime;
  }
  return orderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons;
}

Map<String, dynamic> $OrderListBeanListOrderGoodsDetailResponseOrderGoodsCouponsToJson(OrderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['couponRuleDesc'] = entity.couponRuleDesc;
  data['createName'] = entity.createName;
  data['createTime'] = entity.createTime;
  data['id'] = entity.id;
  data['isDeleted'] = entity.isDeleted;
  data['masterOrderId'] = entity.masterOrderId;
  data['mchCouponAmount'] = entity.mchCouponAmount;
  data['mchCouponId'] = entity.mchCouponId;
  data['mchCouponName'] = entity.mchCouponName;
  data['mchGoodsId'] = entity.mchGoodsId;
  data['mchGoodsName'] = entity.mchGoodsName;
  data['orderGoodsId'] = entity.orderGoodsId;
  data['orderId'] = entity.orderId;
  data['quantity'] = entity.quantity;
  data['remark'] = entity.remark;
  data['salesChannelGoodsId'] = entity.salesChannelGoodsId;
  data['updateName'] = entity.updateName;
  data['updateTime'] = entity.updateTime;
  return data;
}

extension OrderListBeanListOrderGoodsDetailResponseOrderGoodsCouponsExtension on OrderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons {
  OrderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons copyWith({
    String? couponRuleDesc,
    String? createName,
    String? createTime,
    int? id,
    bool? isDeleted,
    int? masterOrderId,
    String? mchCouponAmount,
    int? mchCouponId,
    String? mchCouponName,
    int? mchGoodsId,
    String? mchGoodsName,
    int? orderGoodsId,
    int? orderId,
    int? quantity,
    String? remark,
    int? salesChannelGoodsId,
    String? updateName,
    String? updateTime,
  }) {
    return OrderListBeanListOrderGoodsDetailResponseOrderGoodsCoupons()
      ..couponRuleDesc = couponRuleDesc ?? this.couponRuleDesc
      ..createName = createName ?? this.createName
      ..createTime = createTime ?? this.createTime
      ..id = id ?? this.id
      ..isDeleted = isDeleted ?? this.isDeleted
      ..masterOrderId = masterOrderId ?? this.masterOrderId
      ..mchCouponAmount = mchCouponAmount ?? this.mchCouponAmount
      ..mchCouponId = mchCouponId ?? this.mchCouponId
      ..mchCouponName = mchCouponName ?? this.mchCouponName
      ..mchGoodsId = mchGoodsId ?? this.mchGoodsId
      ..mchGoodsName = mchGoodsName ?? this.mchGoodsName
      ..orderGoodsId = orderGoodsId ?? this.orderGoodsId
      ..orderId = orderId ?? this.orderId
      ..quantity = quantity ?? this.quantity
      ..remark = remark ?? this.remark
      ..salesChannelGoodsId = salesChannelGoodsId ?? this.salesChannelGoodsId
      ..updateName = updateName ?? this.updateName
      ..updateTime = updateTime ?? this.updateTime;
  }
}

OrderListBeanListOrderGoodsDetailResponseOrderLogistics $OrderListBeanListOrderGoodsDetailResponseOrderLogisticsFromJson(Map<String, dynamic> json) {
  final OrderListBeanListOrderGoodsDetailResponseOrderLogistics orderListBeanListOrderGoodsDetailResponseOrderLogistics = OrderListBeanListOrderGoodsDetailResponseOrderLogistics();
  final int? deliveryStatus = jsonConvert.convert<int>(json['deliveryStatus']);
  if (deliveryStatus != null) {
    orderListBeanListOrderGoodsDetailResponseOrderLogistics.deliveryStatus = deliveryStatus;
  }
  final int? issign = jsonConvert.convert<int>(json['issign']);
  if (issign != null) {
    orderListBeanListOrderGoodsDetailResponseOrderLogistics.issign = issign;
  }
  final List<OrderListBeanListOrderGoodsDetailResponseOrderLogisticsList>? list = (json['list'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<OrderListBeanListOrderGoodsDetailResponseOrderLogisticsList>(e) as OrderListBeanListOrderGoodsDetailResponseOrderLogisticsList).toList();
  if (list != null) {
    orderListBeanListOrderGoodsDetailResponseOrderLogistics.list = list;
  }
  final String? logo = jsonConvert.convert<String>(json['logo']);
  if (logo != null) {
    orderListBeanListOrderGoodsDetailResponseOrderLogistics.logo = logo;
  }
  final String? number = jsonConvert.convert<String>(json['number']);
  if (number != null) {
    orderListBeanListOrderGoodsDetailResponseOrderLogistics.number = number;
  }
  final String? type = jsonConvert.convert<String>(json['type']);
  if (type != null) {
    orderListBeanListOrderGoodsDetailResponseOrderLogistics.type = type;
  }
  final String? typeName = jsonConvert.convert<String>(json['typeName']);
  if (typeName != null) {
    orderListBeanListOrderGoodsDetailResponseOrderLogistics.typeName = typeName;
  }
  return orderListBeanListOrderGoodsDetailResponseOrderLogistics;
}

Map<String, dynamic> $OrderListBeanListOrderGoodsDetailResponseOrderLogisticsToJson(OrderListBeanListOrderGoodsDetailResponseOrderLogistics entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['deliveryStatus'] = entity.deliveryStatus;
  data['issign'] = entity.issign;
  data['list'] = entity.list?.map((v) => v.toJson()).toList();
  data['logo'] = entity.logo;
  data['number'] = entity.number;
  data['type'] = entity.type;
  data['typeName'] = entity.typeName;
  return data;
}

extension OrderListBeanListOrderGoodsDetailResponseOrderLogisticsExtension on OrderListBeanListOrderGoodsDetailResponseOrderLogistics {
  OrderListBeanListOrderGoodsDetailResponseOrderLogistics copyWith({
    int? deliveryStatus,
    int? issign,
    List<OrderListBeanListOrderGoodsDetailResponseOrderLogisticsList>? list,
    String? logo,
    String? number,
    String? type,
    String? typeName,
  }) {
    return OrderListBeanListOrderGoodsDetailResponseOrderLogistics()
      ..deliveryStatus = deliveryStatus ?? this.deliveryStatus
      ..issign = issign ?? this.issign
      ..list = list ?? this.list
      ..logo = logo ?? this.logo
      ..number = number ?? this.number
      ..type = type ?? this.type
      ..typeName = typeName ?? this.typeName;
  }
}

OrderListBeanListOrderGoodsDetailResponseOrderLogisticsList $OrderListBeanListOrderGoodsDetailResponseOrderLogisticsListFromJson(Map<String, dynamic> json) {
  final OrderListBeanListOrderGoodsDetailResponseOrderLogisticsList orderListBeanListOrderGoodsDetailResponseOrderLogisticsList = OrderListBeanListOrderGoodsDetailResponseOrderLogisticsList();
  final String? status = jsonConvert.convert<String>(json['status']);
  if (status != null) {
    orderListBeanListOrderGoodsDetailResponseOrderLogisticsList.status = status;
  }
  final String? time = jsonConvert.convert<String>(json['time']);
  if (time != null) {
    orderListBeanListOrderGoodsDetailResponseOrderLogisticsList.time = time;
  }
  return orderListBeanListOrderGoodsDetailResponseOrderLogisticsList;
}

Map<String, dynamic> $OrderListBeanListOrderGoodsDetailResponseOrderLogisticsListToJson(OrderListBeanListOrderGoodsDetailResponseOrderLogisticsList entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['status'] = entity.status;
  data['time'] = entity.time;
  return data;
}

extension OrderListBeanListOrderGoodsDetailResponseOrderLogisticsListExtension on OrderListBeanListOrderGoodsDetailResponseOrderLogisticsList {
  OrderListBeanListOrderGoodsDetailResponseOrderLogisticsList copyWith({
    String? status,
    String? time,
  }) {
    return OrderListBeanListOrderGoodsDetailResponseOrderLogisticsList()
      ..status = status ?? this.status
      ..time = time ?? this.time;
  }
}